package com.laikan.reader.comment;

import com.laikan.reader.core.LaikanApplication;

/**
 * 接口类
 *
 * @author wxl
 */
public class APIProtocol {

    // 设置 测试地址 或 正式地址 ，true 为测试地址 ; false 是正式地址
    // private static boolean IS_RELEASE = LaikanApplication.IS_RELEASE;

    //来看的测试地址

    public static String test_url1 = "http://101.201.77.139:8080/android/1/";
    public static String test_url2 = "http://101.201.77.139:8080/android/2/";
    public static String test_url3 = "http://101.201.77.139:8080/android/3/";

    // 正式地址
    private static String release_url1 = "http://api.motie.com/android/1/";
    private static String release_url2 = "http://api.motie.com/android/2/";
    private static String release_url3 = "http://api.motie.com/android/3/";

    public static String laikan_login = getRootURL() + "accounts/mobile/login";
    public static String laikan_get_commentdetail = getRootURL() + "review/";
    public static String laikan_check_version = getRootURL() + "checkversion/android";
    public static String laikan_get_add_commentdetail = getRootURL() + "reply/6/";
    public static String laikan_goden = getRootURL() + "goden";
    public static String laikan_book_detail = getRootURL() + "book/";
    public static String laikan_user_deatil = getRootURL() + "accounts/i";
    public static String laikan_notify_receive = getRootURL() + "notification/receive/";
    public static String laikan_date = getRootURL() + "accounts/userextent/update";
    public static String laikan_feedback = getRootURL() + "message/list";
    public static String laikan_add_feedback = getRootURL() + "add/message";
    public static String laikan_get_indexbook = getRootURL() + "books/indexBook";
    public static String laikan_get_specialbook = getRootURL() + "books/specialBook";
    public static String laikan_userextent_update = getRootURL() + "accounts/userextent/update";
    public static String laikan_book_follow = getRootURL() + "follow/";

    public static String laikan_get_bookshelf = getRootURL2() + "bookshelf";
    public static String laikan_get_updata_sharebook = getRootURL2() + "share/update/sharebook";
    public static String laikan_get_shelf_recommend = getRootURL2() + "p_shelf_recommend";
    public static String laikan_binding_festival = getRootURL2() + "binding_festival";
    public static String laikan_receive_gift = getRootURL2() + "receive_gift";
    public static String laikan_daily_signin = getRootURL2() + "signin";
    public static String laikan_bookchapter_getQuanbenPrice = getRootURL2() + "bookprice/";
    public static String laikan_personal_recharge = getRootURL2() + "accounts/recharge/detail";
    public static String laikan_personal_consume = getRootURL2() + "accounts/pay/detail";
    public static String laikan_personal_yueduquan = getRootURL2() + "effec_ticket";
    public static String laikan_yueduquan_convert = getRootURL2() + "moticket_give";
    public static String laikan_desbookbuy = getRootURL2() + "book_buy/";
    public static String laikan_deschapterbuy = getRootURL2() + "chapterBatchSta";
    public static String laikan_deschapterbuy_detail = getRootURL2() + "/batch_buy_chapter";
    public static String laikan_fans = getRootURL2() + "bookfollow?id=";
    public static String laikan_festivalcoupon = getRootURL2() + "receive_gift";
    public static String laikan_get_reward = getRootURL2() + "donate/list/";
    public static String laikan_rechargepage = getRootURL2() + "accounts/tenPay";
    public static String laikan_personal_binding = getRootURL2() + "binding_festival";
    public static String laikan_share_read = getRootURL2() + "share/list/shareread";
    public static String laikan_deschapterbuy_pilianginfo = getRootURL3() + "batch_buy_chapter/detail";
    public static String laikan_vfubao_create_order = "http://m.laikan.com/android_vfubao/create_order";//服务器获取订单号地址
    public static String laikan_weixinpay = "http://laikan.motie.com/m_client/pay/weixinPay";//服务器获取订单号地址

    public static String laikan_clicktosupport = getRootURL3() + "review/";
    public static String laikan_book_detail_new = getRootURL3() + "book/";

    //精选首页地址:
    public static String laikan_book_store_home = getRootURL3()+"portal/index";
    //排行首页地址:
    public static String laikan_rank_home = getRootURL3()+"rank/index/";
    //看点发送评论
    public static String laikan_book_focus_send_comment = getRootURL3() + "kandian/addReview";
    //看点评论列表
    public static String laikan_book_focus_comment_list = getRootURL3() + "kandian/reviewList";
    //看点点赞/取消
    public static String laikan_book_focus_update_praise = getRootURL3() + "kandian/updatePraise";
    //个性签名
    public static String laikan_person_sign_in = getRootURL3() + "kandian/editIntro";

    public static String laikan_bookfocus_article_list = getRootURL3() + "kandian/shorteList";  //看点文章列表
    public static String laikan_bookfocus_article_detail = getRootURL3() + "kandian/getShortDetail/"; //看点详情Web页
    public static String laikan_bookfocus_article_url_request = getRootURL3() + "kandian/isCollect"; //看点详情本地数据请求
    public static String laikan_bookfocus_replyList = getRootURL3() + "kandian/replyList"; //回复列表
    public static String laikan_bookfocus_addreply = getRootURL3() + "kandian/addReply"; //添加回复

    public static String laikan_collect_list = getRootURL3() + "kandian/collectList";  // 收藏列表
    public static String laikan_cancel_collect = getRootURL3() + "kandian/delCollect"; // 取消收藏
    public static String laikan_add_collect = getRootURL3() + "kandian/addCollect"; // 添加收藏

    public static String laikan_article_search = getRootURL3() + "kandian/search"; //文章搜索

    public static String laikan_add_attention = getRootURL3() + "kandian/addAttention"; //添加关注
    public static String laikan_cancel_attention = getRootURL3() + "kandian/delAttention"; //取消关注
    public static String laikan_personal_home = getRootURL3() + "kandian/home"; //个人首页
    public static String laikan_get_attention_list = getRootURL3() + "kandian/attentionList"; //关注列表
    public static String laikan_get_funs_list = getRootURL3() + "kandian/funsList"; //粉丝列表

    /**
     * 第三方分享链接接口
     */
    public static String shareLinkUrl = "http://api.motie.com/m/huodong/hongbao/shareread/index?";
    public static String share_article_LinkUrl = getRootURL3() + "kandian/shareData";

    /**
     * 获取根地址
     *
     * @return
     */
    public static String getRootURL() {
        return LaikanApplication.IS_RELEASE ? release_url1 : release_url1;
    }

    public static String getRootURL2() {
        return LaikanApplication.IS_RELEASE ? release_url2 : release_url2;
    }

    public static String getRootURL3() {
        return LaikanApplication.IS_RELEASE ? release_url3 : release_url3;
    }
}